import { createRouter, createWebHashHistory, createWebHistory } from "vue-router";

const routes = [
    {
        path: '/',
        name: "home", //以后跳转用的名称
        component: () => import("@/views/Home.vue")
    },
    {
        path: '/category',
        name: "category", //以后跳转用的名称
        component: () => import("@/views/product/Category.vue")
    },
    {
        path: '/product/list',
        name: "product-list", //以后跳转用的名称
        component: () => import("@/views/product/List.vue")
    },
    {
        path: '/finder',
        name: "finder", //以后跳转用的名称
        component: () => import("@/views/other/Finder.vue")
    },
    {
        path: '/cart',
        name: "cart", //以后跳转用的名称
        component: () => import("@/views/order/Cart.vue")
    },
    {
        path: '/my',
        name: "my", //以后跳转用的名称
        component: () => import("@/views/my/My.vue")
    }

]

const router = createRouter({
    // history: createWebHashHistory('/'),
    history: createWebHistory(),
    routes
})


export default router